<?php /*a:1:{s:63:"D:\phpstudy_pro\WWW\shop24\app\admin\view\brand\brand_list.html";i:1612511201;}*/ ?>
﻿<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="renderer" content="webkit">
  <title>品牌列表</title>
  <link rel="stylesheet" href="/static/css/pintuer.css">
  <link rel="stylesheet" href="/static/css/admin.css">
  <script src="/static/js/jquery.js"></script>
  <script src="/static/js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder"> 品牌列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
  <div class="padding border-bottom">
    <ul class="search" style="padding-left:10px;">
      <li> <a class="button border-main icon-plus-square-o" href="good_add.html"> 添加内容</a> </li>
      <form action="" id="F">
        <li>搜索：</li>
        <!--<li>-->
          <!--<?php if(is_array($test) || $test instanceof \think\Collection || $test instanceof \think\Paginator): if( count($test)==0 ) : echo "" ;else: foreach($test as $key=>$v): ?>-->
          <!--<ladel><input type="radio" name="sex" value="<?php echo htmlentities($key); ?>"> <?php echo htmlentities($v); ?></ladel>-->
          <!--<?php endforeach; endif; else: echo "" ;endif; ?>-->
        <!--</li>-->
        <li>
          <!--首页-->
          <!--<select name="is_show" style="padding:5px 15px; border:1px solid #ddd;" >-->
            <!--<option value="">选择</option>-->
            <!--<option value="1">是</option>-->
            <!--<option value="0">否</option>-->
          <!--</select>-->
          显示
          <select name="is_hot" style="padding:5px 15px; border:1px solid #ddd;" >
            <option value="">选择</option>
            <option value="1" <?php echo $is_hot=='1' ? 'selected' : ''; ?>>显示</option>
            <option value="0" <?php echo $is_hot=='0' ? 'selected' : ''; ?>>不显示</option>
          </select>
          推荐
          <select name="is_down" style="padding:5px 15px; border:1px solid #ddd;" >
            <option value="">选择</option>
            <option value="1" <?php echo $if_show=='1' ? 'selected' : ''; ?>>推荐</option>
            <option value="0" <?php echo $if_show=='0' ? 'selected' : ''; ?>>不推荐</option>
          </select>
        </li>

        <!--<li>-->
          <!--<select name="cid" style="padding:5px 15px; border:1px solid #ddd;">-->
            <!--<option value="">请选择分类</option>-->
            <!--<optgroup label="手机壳">-->
              <!--<option value="">三星</option>-->
              <!--<option value="">华为</option>-->
              <!--<option value="">小米</option>-->
            <!--</optgroup>-->
            <!--<optgroup label="杯子"></optgroup>-->
            <!--<optgroup label="U盘"></optgroup>-->
          <!--</select>-->
        <!--</li>-->
        <li>
          <input type="radio" name="tp" value="1" <?php echo $tp=='1' ? 'checked' : ''; ?>>有图
          <input type="radio" name="tp" value="2" <?php echo $tp=='2' ? 'checked' : ''; ?>>无图
        </li>
        <li>
          <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:200px; line-height:17px;display:inline-block" value="<?php echo htmlentities($keywords); ?>"/>
          <a href="javascript:F.submit();" class="button border-main icon-search" > 搜索</a></li>
    </ul>
    </form>
  </div>
  <table class="table table-hover text-center">
    <tr>
      <th width="100" style="text-align:left; padding-left:20px;">ID</th>
      <th width="15%">品牌名称</th>
      <th>类别</th>
      <th>品牌LOGO</th>

      <th>排序</th>
      <th>显示</th>
      <th>推荐</th>

      <th width="310">操作</th>
    </tr>
    <?php if(is_array($rt) || $rt instanceof \think\Collection || $rt instanceof \think\Paginator): $i = 0; $__LIST__ = $rt;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
    <tr>
      <td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]" value="" /><?php echo htmlentities($v['brand_id']); ?></td>
      <td><?php echo htmlentities($v['brand_name']); ?></td>
      <td><?php echo htmlentities($v['tag']); ?></td>
      <td width="10%"><img src="/static/images/<?php echo $v['brand_logo']=='' ? 'default.png' : htmlentities($v['brand_logo']); ?>" alt="" width="70" height="50" /></td>

      <td><?php echo htmlentities($v['sort_order']); ?></td>
      <td><font color="#00CC99"><?php echo htmlentities($v['if_show']); ?></font></td>
      <td><font color="#00CC99"><?php echo htmlentities($v['recommended']); ?></font></td>

      <td><div class="button-group"> <a class="button border-main" href="good_add.html"><span class="icon-edit"></span> 修改</a> <a class="button border-red" href="javascript:void(0)" onclick="return del(1,1,1)"><span class="icon-trash-o"></span> 删除</a> </div></td>
    </tr>
    <?php endforeach; endif; else: echo "" ;endif; ?>

    <td style="text-align:left; padding:19px 0;padding-left:20px;"><input type="checkbox" id="checkall"/>
      全选 </td>
    <td colspan="9" style="text-align:left;padding-left:20px;"><a href="javascript:void(0)" class="button border-red icon-trash-o" style="padding:5px 15px;" onclick="DelSelect()"> 删除</a> <a href="javascript:void(0)" style="padding:5px 15px; margin:0 10px;" class="button border-blue icon-edit" onclick="sorts()"> 排序</a> 操作：
      <select name="ishome" style="padding:5px 15px; border:1px solid #ddd;" onchange="changeishome(this)">
        <option value="">首页</option>
        <option value="1">是</option>
        <option value="0">否</option>
      </select>
      <select name="isvouch" style="padding:5px 15px; border:1px solid #ddd;" onchange="changeisvouch(this)">
        <option value="">推荐</option>
        <option value="1">是</option>
        <option value="0">否</option>
      </select>
      <select name="istop" style="padding:5px 15px; border:1px solid #ddd;" onchange="changeistop(this)">
        <option value="">下架</option>
        <option value="1">是</option>
        <option value="0">否</option>
      </select>
    </td>
    </tr>
    <tr>
      <td colspan="9"><?php echo $rt; ?></td>
    </tr>
  </table>
</div>
<script type="text/javascript">

    //搜索
    function changesearch(){

    }

    //单个删除
    function del(id,mid,iscid){
        if(confirm("您确定要删除吗?")){

        }
    }

    //全选
    $("#checkall").click(function(){
        $("input[name='id[]']").each(function(){
            if (this.checked) {
                this.checked = false;
            }
            else {
                this.checked = true;
            }
        });
    })

    //批量删除
    function DelSelect(){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){
            var t=confirm("您确认要删除选中的内容吗？");
            if (t==false) return false;
            $("#listform").submit();
        }
        else{
            alert("请选择您要删除的内容!");
            return false;
        }
    }

    //批量排序
    function sorts(){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");
            return false;
        }
    }


    //批量首页显示
    function changeishome(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }

    //批量推荐
    function changeisvouch(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){


            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }

    //批量置顶
    function changeistop(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }


    //批量移动
    function changecate(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){

            $("#listform").submit();
        }
        else{
            alert("请选择要操作的内容!");

            return false;
        }
    }

    //批量复制
    function changecopy(o){
        var Checkbox=false;
        $("input[name='id[]']").each(function(){
            if (this.checked==true) {
                Checkbox=true;
            }
        });
        if (Checkbox){
            var i = 0;
            $("input[name='id[]']").each(function(){
                if (this.checked==true) {
                    i++;
                }
            });
            if(i>1){
                alert("只能选择一条信息!");
                $(o).find("option:first").prop("selected","selected");
            }else{

                $("#listform").submit();
            }
        }
        else{
            alert("请选择要复制的内容!");
            $(o).find("option:first").prop("selected","selected");
            return false;
        }
    }

</script>
</body>
</html>